import Vue from 'vue'
import Router from 'vue-router'

import Home from '@/components/index/home'
import Index from '@/components/index/index'

import Info from '@/components/index/ksInfo/index'

import Introucted from '@/components/index/introucted/index'

import News from '@/components/index/news/index'

import Resources from '@/components/index/resources/index'

import Shopping from '@/components/index/shopping/index'



import Contact from '@/components/index/contact/index'


import ClassesData from '@/components/teacher/class_management/ClassesData.vue'
import NurseryData from '@/components/teacher/class_management/NurseryData.vue'
import WorksData from '@/components/teacher/class_management/WorksData.vue'

import ClassAdd from '@/components/admin/course_management/ClassAdd.vue'
import ClassPreinstall from '@/components/admin/course_management/ClassPreinstall.vue'
import CourseAdd from '@/components/master/course_management/CourseAdd.vue'
import CourseApprove from '@/components/admin/course_management/CourseApprove.vue'
import CourseData from '@/components/master/course_management/CourseData.vue'
import CourseState from '@/components/admin/course_management/CourseState.vue'


import Issue from '@/components/admin/enrollment_guide/Issue.vue'
import GuideData from '@/components/admin/enrollment_guide/GuideData.vue'
import OpenClass from '@/components/admin/enrollment_guide/OpenClass.vue'

import FixSchoolInfo from '@/components/admin/index_management/fixSchoolInfo.vue'
import SchoolTeacherList from '@/components/admin/index_management/SchoolTeacherList.vue'
import CooperationList from '@/components/admin/index_management/CooperationList.vue'
import NewsList from '@/components/admin/index_management/NewsList.vue'

import FixInfor from '@/components/person/FixInfor.vue'
import FixPassword from '@/components/person/FixPassword.vue'


import TeacherData from '@/components/admin/user_management/TeacherData.vue'
import ClassData from '@/components/admin/user_management/ClassData.vue'
import ChildrenData from '@/components/admin/user_management/ChildrenData.vue'
import AdminData from '@/components/admin/user_management/AdminData.vue'
import MasterData from '@/components/admin/user_management/MasterData.vue'

import hthome from '@/components/Home'
import Login from '@/components/Login'
import Welcome from '@/components/Welcome'




Vue.use(Router)

const router = new Router({
  routes: [
    { path: '/', redirect: '/home' },
    {
      path: '/home',
      component: Home,
      redirect: '/index',
      children:[
        {path:'/index', component: Index},
        {
          path:'/info',
          component: Info,
        },
        {
          path: '/introucted',
          component: Introucted,
        },
        {
          path: '/news',
          component: News,

        },
        {
          path: '/resources',
          component: Resources,

        },
        {
          path: '/shopping',
          component: Shopping,

        },
        {
          path: '/contact',
          component: Contact,
        }

      ]
    },
    { path: '/login', component: Login },
    {
      path: '/hthome',
      component: hthome,
      redirect: '/welcome',
      children: [
        { path: '/welcome', component: Welcome },

        { path: '/fixinfor', component: FixInfor },
        { path: '/fixpassword', component: FixPassword },

        { path: '/teacherdata', component: TeacherData },
        { path: '/classdata', component: ClassData },
        { path: '/childrendata', component: ChildrenData },
        { path: '/admindata', component: AdminData },
        { path: '/masterdata', component: MasterData },

        { path: '/classadd', component: ClassAdd },
        { path: '/classpreinstall', component: ClassPreinstall },
        { path: '/couseradd', component: CourseAdd },
        { path: '/courseapprove', component: CourseApprove },
        { path: '/coursedata', component: CourseData },
        { path: '/coursestate', component: CourseState },

        { path: '/issue', component: Issue},
        { path: '/guideData', component: GuideData},
        { path: '/openClass', component: OpenClass },

        { path: '/fixSchoolInfo', component: FixSchoolInfo },
        { path: '/schoolTeacherList', component: SchoolTeacherList },
        { path: '/cooperationList', component: CooperationList },
        { path: '/newsList', component: NewsList },

        { path: '/classesdata', component: ClassesData},
        { path: '/nurserydata', component: NurseryData},
        { path: '/worksdata', component: WorksData},


      ]
    }
  ]
})

export default router
